#!/usr/bin/env Python
# -*- coding:utf-8 -*-

def get_list():
	'''获取列表
	'''
	L = []
	while 1:
		a = input('请输入一个数字，回车下一个，直接回车结束输入。')
		if a != '':
			a = int(a)
			L.append(a)
		else:
			break
	return L


def sort_list(L):
	'''排序求最大最小
	'''
	L.sort()
	Max = L[-1]
	Min = L[0]
	return Max,Min


def max_min(L):
	'''内置函数求最大最小
	'''
	Max = max(L)
	Min = min(L)
	return Max, Min


def for_l(L):
	'''冒泡法?求最大最小
	'''
	Max = Min = L[0]
	for i in L:
		if Max < i:
			Max = i
		elif Min > i:
			Min = i
	return Max, Min


if __name__ == '__main__':
	the_list = get_list()
	print(the_list)
#	Max, Min = sort_list(the_list)
	Max, Min = max_min(the_list)
#	Max, Min = for_l(the_list)
	print('最大值为{}'.format(Max))
	print('最小值为{}'.format(Min))